.main-page{
  position: relative;
  max-width: 375px;
  margin: 0 auto;
  height: 100vh;
  .background{
    z-index: -1;
    height: 100%;
    background: url(../images/background.gif) 50% 0/cover no-repeat;
  }
  .perspect{
    width: 100%;
    height: 100%;
    perspective: 320px;
    transform-origin: 50% 50% 0px;
    transform-style: preserve-3d;
    .linear{
      transform-style: preserve-3d;
      transform: translateZ(1620px);
      height: 100%;
      width: 100%;
    }
  }
  .layer{
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    &.sec1{
      z-index: 10;
      transform: translateZ(0);
      .mubu{
        height: 272px;
        top: -67px;
        left: -27px;
      }
      .home{
        pointer-events: none;
        z-index: 10;
        top: 40px;
        left: -70px;
        right: -70px;
        bottom: 0;
        img{
          // height: 100%;
          position: absolute;
          bottom: 0;
        }
      }
      .door-static{
        width: 224px;
        left: 74px;
        bottom: 165px;
        z-index: 9;
        img{
          bottom: 0;
        }
        .door-text{
          position: absolute;
          z-index: 10;
          top: -185px;
          color: #da0000;
          left: 83px;
          span{
            font-family: fangzheng_lsjt;
            font-size: 18px;
            writing-mode: vertical-rl;
            display: block;
            position: relative;
            letter-spacing: 5px;
            &.t2{
              left: 36px;
              top: -50px;
              letter-spacing: 7px;
            }
          }
        }
        .cursor{
          opacity: 0;
          font-family: fangzheng_lbjt;
          text-align: center;
          background: url(../images/cursor.webp) 50% 0/25% 25% no-repeat;
          position: absolute;
          z-index: 10;
          top: 0px;
          left: 65px;
          width: 96px;
          height: 138px;
          padding-top: 50px;
          font-size: 12px;
          color: rgb(255, 241, 170);
          &.shown{
            animation: slide 1.5s ease-in-out infinite;
            .cursor-tip{
              animation: blink .5s ease-in-out infinite;
            }
          }
        }
      }
      .door{
        width: 224px;
        left: 74px;
        bottom: 165px;
        z-index: 9;
        display: none;
        &.shown{
          display: block;
          .light img{
            animation: bright 2s ease-out;
            animation-fill-mode: forwards;
          }
        }
        img{
          bottom: 0;
        }
        
      }
      .light{
        width: 224px;
        left: 74px;
        bottom: 165px;
        z-index: 100;
        display: none;
        pointer-events: none;
        img{
          bottom: 50px;
        }
        &.shown{
          display: block;
          img{
            animation: bright 1.8s ease-out;
            animation-fill-mode: forwards;
          }
        }
      }
      .shu{
        width: 225px;
        z-index: 11;
        bottom: 40px;
        text-align: left;
        left: -200px;
        img{
          position: absolute;
          bottom: 0;
        }
        &.shu2{
          right: 0px;
          left: auto;
          text-align: right;
        }
        &.shown{
          &.shu1{
            animation: rotate 2s ease infinite;
          }
          &.shu2{
            animation: rotate2 2s ease infinite;
          }
        }
      }
    }
    &.sec2, &.sec4{
      z-index: 9;
      transform: translateZ(-320px);
      .pillar{
        width: 180px;
        left: -24px;
        bottom: 140px;
        img{
          position: absolute;
          bottom: 0;
          
        }
        span{
          font-family: fangzheng_lbjt;
          font-size: 24px;
          writing-mode: vertical-rl;
          display: block;
          position: relative;
          letter-spacing: 32px;
          color: rgb(255, 219, 0);
          top: -128px;
          left: 140px;
        }
        &.pillar2{
          left: 220px;
          img{
            transform: rotateY(180deg);
          }
          span{
            left: 11px;
          }
        }
      }
    }
    &.sec3{
      z-index: 8;
      transform: translateZ(-640px);
      .home{
        left: -20px;
        right: -20px;
        bottom: 140px;
        img{
          position: absolute;
          bottom: 0;
        }
        .text{
          position: absolute;
          font-family: fangzheng_lbjt;
          font-size: 16px;
          writing-mode: vertical-rl;
          letter-spacing: 2px;
          color: rgb(255, 219, 0);
          top: -250px;
          left: 50px;
          z-index: 10;
          &.t2{
            left: 347px;
          }
        }
      }
      .happy{
        width: 300px;
        left: 40px;
        bottom: 140px;
        img{
          top: -450px;
        }
      }
      .papa{
        width: 110px;
        bottom: 140px;
        left: 85px;
        img{
          top: -300px;
        }
      }
      .mama{
        width: 110px;
        bottom: 140px;
        left: 170px;
        img{
          top: -275px;
        }
      }
    }
    &.sec4{
      z-index: 7;
      transform: translateZ(-960px);
    }
    &.sec5{
      z-index: 6;
      transform: translateZ(-1280px);
      .bg{
        width: 260px;
        left: 65px;
        bottom: 100px;
        img{
          &.border{
            bottom: 0;
          }
          &.under{
            bottom: 0;
            left: 0;
          }
          &.corner{
            left: 0;
            width: 80px;
            top: -500px;
          }
          &.banner{
            left: 80px;
            width: 110px;
            top: -490px;
          }
          &.banner2{
            left: 104px;
            width: 60px;
            top: -455px;
          }
          &.flower1{
            width: 80px;
            left: 180px;
            top: -475px;
          }
          &.flower2{
            width: 80px;
            left: 10px;
            top: -60px;
          }
          &.flower3{
            width: 80px;
            left: 180px;
            top: -80px;
            transform: rotate(180deg);
          }
          &.cloud2{
            width: 30px;
            left: 200px;
            top: -40px;
          }
          &.dl{
            width: 80px;
            left: 0px;
            top: -470px;
            animation: hanging 3s ease infinite;
            &.dl2{
              width: 50px;
              transform: translateY(80px);
              animation-duration: 2.5s;
            }
            &.dl3{
              width: 60px;
              left: 200px;
              transform: translateY(30px);
            }
          }
          &.cloud1{
            width: 60px;
            left: 10px;
            top: -215px;
          }
          &.year{
            width: 25px;
            left: 210px;
            top: -215px;
          }
          &.win1{
            width: 40px;
            left: 4px;
            top: -100px;
          }
          &.win2{
            width: 40px;
            left: 218px;
            top: -100px;
          }
          &.door{
            bottom: 0px;
            left: 50px;
            width: 150px;
          }
          &.banner3{
            bottom: 145px;
            left: 50%;
          transform: translateX(-50%);
            width: 250px;
          }
          &.date{
            bottom: 120px;
            left: 30px;
            width: 200px;
          }
        }
        span{
          position: absolute;
          color: rgb(255, 241, 170);
          font-size: 20px;
          bottom: 405px;
          left: 50%;
          transform: translateX(-50%);
          text-align: center;
          &.title{
            max-width: 180px;
            font-family: fangzheng_lbjt;
          }
          &.word{
            bottom: 148px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 14px;
          }
          &.sub{
            bottom: 100px;
            left: 50%;
            width: 320px;
            transform: translateX(-50%);
            font-size: 14px;
          }
        }
      }
      .fireworks{
        bottom: 100px;
        left: 80px;
        .item{
          position: absolute;
          bottom: 250px;
          width: 40px;
          img{
            &.t1{
              animation: zoomIn 2s ease-in-out infinite;
            }
            &.t2{
              animation: zoomOut 2s ease-in-out infinite;
            }
          }
          &.item2{
            left: 180px;
            bottom: 250px;
            width: 40px;
          }
          &.item3{
            left: 150px;
            bottom: 420px;
            width: 30px;
          }
          &.item3{
            left: 150px;
            bottom: 420px;
          }
          &.item4{
            left: 30px;
            bottom: 450px;
            width: 60px;
          }
          &.item5{
            left: 20px;
            bottom: 150px;
            width: 40px;
          }
          &.item6{
            left: 180px;
            bottom: 120px;
            width: 50px;
          }
        }
      }
      .textbg{
        width: 190px;
        left: 100px;
        bottom: 100px;
        img{
          top: -390px;
        }
      }
      .text{
        width: 230px;
        left: 85px;
        bottom: 100px;
        img{
          top: -370px;
          &.cloud2{
            width: 50px;
            left: 180px;
            top: -345px;
          }
          &.cloud3{
            width: 30px;
            left: 150px;
            top: -355px;
          }
        }
        span{
          font-family: fangzheng_lbjt;
          font-size: 20px;
          color: rgb(255, 219, 0);
          left: 60px;
          position: absolute;
          bottom: 20px;
          padding: 5px;
          animation: brinking 2s ease-in-out infinite;
        }
      }
    }
    &.sec6{
      z-index: 6;
      transform: translateZ(-1620px);
      .box{
        bottom: 200px;
        height: 300px;
        padding: 40px 20px;
        width: 250px;
        color: #666;
        left: 50%;
        transform: translateX(-50%);
        background: rgb(247, 227, 101);
        font-size: 14px;
        .title{
          text-align: center;
          padding-bottom: 15px;
          font-size: 16px;
        }
        label{
          display: block;
          padding-bottom: 5px;
        }
        input{
          display: block;
          width: 100%;
          margin-bottom: 12px;
          height: 32px;
          padding-left: 8px;
        }
        .generate{
          position: absolute;
          text-align: center;
          padding: 5px 8px;
          background: #fff;
          left: 50%;
          transform: translateX(-50%);
          top: 220px;
          border-radius: 5px;
        }
      }
    }
  }

}

@keyframes slide {
  0% {
    background-position-y: 0;
  }
  50% {
    background-position-y: 10px;
  }
  100% {
    background-position-y: 0;
  }
}
@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes rotate{
  0% {
    transform: translate(0,0);
  }
  30% {
    transform: translate(20px,-25px);
  }
  70% {
    transform: translate(-10px,-10px);
  }
  100% {
    transform: translate(0,0);
  }
}
@keyframes rotate2{
  0% {
    transform: translate(0,0);
  }
  30% {
    transform: translate(-20px,-25px);
  }
  70% {
    transform: translate(10px,-10px);
  }
  100% {
    transform: translate(0,0);
  }
}
@keyframes bright{
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(3);
  }
  70% {
    transform: scale(6);
    opacity: .9;
  }
  100% {
    transform: scale(9);
    opacity: 0;
    display: none;
  }
}
@keyframes hanging{
  0% {
    top: -470px;
  }
  50% {
    top: -480px;
  }
  100% {
    top: -470px;
  }
}
@keyframes zoomIn{
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: .5;
  }
}
@keyframes zoomOut{
  0% {
    transform: scale(1);
    opacity: .6;
  }
  100% {
    transform: scale(1.5);
    opacity: .2;
  }
}
@keyframes brinking {
  0%{
    box-shadow: 0 0 10px  rgba(255, 219, 0,.6);
  }
  50%{
    box-shadow: 0 0 30px  rgba(255, 219, 0,.3);
  }
  100%{
    box-shadow: 0 0 10px  rgba(255, 219, 0,.6);
  }
}